<template>
  <div class="page">

    <myHeader class="my-header"></myHeader>


    <div class="page-content">

      <mySide class="my-side"></mySide>

      <div class="page-main">
        <router-view></router-view>
      </div>
    </div>


  </div>
</template>

<script>
import myHeader from '../components/myHeader.vue';
import mySide from '../components/mySide.vue';


export default {
  name: 'HomePage',
  components: {
    myHeader,
    mySide
  },
  data() {
    return {}
  },
  mounted() {
    // if (!this.getCookie('token')) {
    //   this.$router.push("/Login")
    // }


  },
  methods: {
    getCookie: function (name) {
      let cookies = document.cookie.split('; ');
      for (let i = 0; i < cookies.length; i++) {
        let parts = cookies[i].split('=');
        if (parts[0] === name) {
          return parts[1];
        }
      }
      return '';
    }



  }
}
</script>

<style scoped lang="less">
.page-content {
  display: flex;
  height: calc(100vh - 80px);
  // height: 100vh;

  .my-side {
    height: 100%;
  }

  .page-main {
    // width: 100%;
    width: calc(100% - 120px);
    padding: 0 10px;

    .control-box {
      height: 60px;
      line-height: 60px;
      padding: 0 20px;
      display: flex;
      justify-content: space-between;

      .control-right {
        .search-input {
          margin-right: 10px;
          height: 30px;
          line-height: 30px;
          width: 300px;
          padding: 0 5px;
        }
      }
    }

    .table-box {
      width: 100%;
    }
  }


}
</style>
